using System.Collections.Generic;
using UnityEngine;

public class SfxManager : MonoBehaviour
{
	public List<SfxSounds> allSfx = new List<SfxSounds>();

	public SfxSounds GetSfx(SfxId needId)
	{
		return allSfx.Find((SfxSounds needSfx) => needSfx.id == needId);
	}

	public AudioClip GetSoundSfx(SfxId needId)
	{
		SfxSounds sfx = GetSfx(needId);
		if (sfx != null)
		{
			return sfx.GetRandom();
		}
		return null;
	}
}
